'use strict';

const Controller = require('egg').Controller;

class ArticleController extends Controller {
    async index() {
        const { ctx } = this
        var db = this.app.mongodb;
        var res = await db.collection("article").find().toArray();
        console.log(res);
        ctx.body = res
    }
}

module.exports = ArticleController;
